find out the hard way

Translations
l'apprendre à ses dépens
Definitions
To learn or discover something through personal experience, often involving difficulty, pain, or negative consequences, rather than being told or warned in advance.